<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="../core/Cf.js"></script>
<script src="../core/prototype/function.js"></script>
<script src="../core/prototype/String.js"></script>
<script src="../core/Class.js"></script>
<script src="../core/Component.js"></script>
<script>
	var A = Cf.Class(Cf.Component, {
		constructor: function(config){
			Cf.put(this, config);
			this.addEvents('e1', 'e2');
			A.__parent.constructor.call(this, config);
		}
		,e1: function(){
			this.fireEvent('e1', this);
		}
		,e2: function(){
			this.fireEvent('e2', this);
		}
	});

	var a = new A({
		plugins: [
			new function(){
				this.init = function(a){
					a.onE1(function(b){console.log(b)});
				}
			}
		]
	});
	a.e1();
</script>
</head>
<body>

</body>
</html>